<?php 
namespace Home\Model;
use Think\Model;
class UserModel extends Model{



				public function checkEmail($email){

			       $res=$this->where(array('email'=>$email))->find();
			       
			       return $res;
				}
			   
			    public function checkNickname($nickName){
			      
			      $res = $this->where(array('nickname'=>$nickName))->find();

			      return $res;

			    }

		   public function checkPassword($email,$password){
		    $res=$this->where(array('password'=>md5($password),'email'=>$email))->find();
		     return $res;  
		   }



	    public function find_result(){

         $res=$this->where(array('id'=>$_SESSION['id']))->find();

         // var_dump($this);
          // var_dump($res);
           return $res;

	    }
      
            // 更新验证

       
	    public function checkNewNickname($nickName){
	      
	      $res = $this->where(array('nickname'=>$nickName,'id'=>array('neq',$_SESSION['id'])))->find();

           // var_dump($this);
	      return $res;

	    }

 
         public function checkNewemail($email){
	      
	      $res = $this->where(array('email'=>$email,'id'=>array('neq',$_SESSION['id'])))->find();
           // var_dump($res);
	      return $res;

	    }



			   
 }






 ?>